<?php
include ("../conn.php");

$tib = "";
if(isset($_POST['submit'])){
	$upsql="update ".$databasepre."corpinfo set CNAME='".mysql_real_escape_string($_POST['CNAME'])."',CABNAME='".mysql_real_escape_string($_POST['CABNAME'])."',CDOMAIN='".mysql_real_escape_string($_POST['CDOMAIN'])
			."', CADDRESS='".mysql_real_escape_string($_POST['CADDRESS'])."', CABADDRESS='".mysql_real_escape_string($_POST['CABADDRESS'])
			."', CADDRESS2='".mysql_real_escape_string($_POST['CADDRESS2'])."', CABADDRESS2='".mysql_real_escape_string($_POST['CABADDRESS2'])
			."', CNAME2='".mysql_real_escape_string($_POST['CNAME2'])."', CABNAME2='".mysql_real_escape_string($_POST['CABNAME2'])
			."', WNAME='".mysql_real_escape_string($_POST['WNAME'])."', WSTYLE='".mysql_real_escape_string($_POST['WSTYLE'])."',VIDEOFLAG = ".mysql_real_escape_string($_POST['VIDEOFLAG']).",SHOWCASENAME = '".mysql_real_escape_string($_POST['SHOWCASENAME'])."',SHOWCASENUM=".mysql_real_escape_string($_POST['SHOWCASENUM'])." WHERE CID=1";

	//echo $upsql;
	//exit;
	mysql_query($upsql);
	$tib = "<font color=red>已修改成功！</font>";
}
$sql="select * from ".$databasepre."corpinfo WHERE CID=1";
$query=mysql_query($sql);
$row=mysql_fetch_array($query);
?>
<html><head>
<meta http-equiv=Content-Type content=text/html;charset=utf-8>
<link href="images/skin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="images/content-bg.gif">
		<table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
		  <tr><td height="31"><div class="titlebt">常规管理</div></td></tr>
		</table>
	</td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
	<!-- 网页内容部分开始 -->


	<table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
      <tr><td height="13" valign="top">&nbsp;</td></tr>
	  <tr><td class="left_txt">当前位置：基本设置</td></tr>
	  <!-- 一根线 -->
	  <tr><td height="20"><table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC"><tr><td></td></tr></table></td></tr>
	  <!-- 说明信息 -->
	  <tr><td><table width="100%" height="55" border="0" cellpadding="0" cellspacing="0"><tr>
				<td width="10%" height="55" valign="middle"><img src="images/title.gif" width="54" height="55"></td>
				<td width="90%" valign="top"><span class="left_txt2">在这里，您可以根据您的网站要求，修改设置网站的基本参数！</span><br>
				</td>
				</tr></table>
		</td>
	  </tr>
	  <tr><td>&nbsp;</td></tr>
	  <tr><td><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="nowtable">
				  <tr><td class="left_bt2">&nbsp;&nbsp;&nbsp;&nbsp;系统参数设置</td></tr>
				</table>
		</td>
      </tr>
	  <tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">
				<form method=POST action="">
					<tr bgcolor="#f2f2f2">
						<td width="20%" height="30" align="right"  class="left_txt2">企业名称[全称]：</td>
						<td width="3%" >&nbsp;</td>
						<td width="32%" height="30" ><input name="CNAME" type="text" size="30" value="<?php echo $row['CNAME']?>"/></td>
						<td width="45%" height="30"  class="left_txt"></td>
					</tr>
					<tr>
						<td height="30" align="right" class="left_txt2">企业名称[简写]：</td>
						<td>&nbsp;</td>
						<td><input type="text" name="CABNAME" size="30" value="<?php echo $row['CABNAME']?>"/></td>
						<td class="left_txt"></td>
					</tr>

					<tr bgcolor="#f2f2f2">
						<td width="20%" height="30" align="right"  class="left_txt2">企业名称[全称_中文]：</td>
						<td width="3%" >&nbsp;</td>
						<td width="32%" height="30" ><input name="CNAME2" type="text" size="30" value="<?php echo $row['CNAME2']?>"/></td>
						<td width="45%" height="30"  class="left_txt"></td>
					</tr>
					<tr>
						<td height="30" align="right" class="left_txt2">企业名称[简写_中文]：</td>
						<td>&nbsp;</td>
						<td><input type="text" name="CABNAME2" size="30" value="<?php echo $row['CABNAME2']?>"/></td>
						<td class="left_txt"></td>
					</tr>

					<tr bgcolor="#f2f2f2">
						<td height="30" align="right"  class="left_txt2">企业地址[全称]：</td>
						<td>&nbsp;</td>
						<td height="30" ><input name="CADDRESS" type="text" size="30" value="<?php echo $row['CADDRESS']?>"/></td>
						<td height="30"  class="left_txt"></td>
					</tr>
					<tr>
						<td height="30" align="right" class="left_txt2">企业地址[简写]：</td>
						<td>&nbsp;</td>
						<td><input type="text" name="CABADDRESS" size="30" value="<?php echo $row['CABADDRESS']?>"/></td>
						<td class="left_txt"></td>
					</tr>
					<tr bgcolor="#f2f2f2">
						<td height="30" align="right"  class="left_txt2">企业地址[全称_中文]：</td>
						<td>&nbsp;</td>
						<td height="30" ><input name="CADDRESS2" type="text" size="30" value="<?php echo $row['CADDRESS2']?>"/></td>
						<td height="30"  class="left_txt"></td>
					</tr>
					<tr>
						<td height="30" align="right" class="left_txt2">企业地址[简写_中文]：</td>
						<td>&nbsp;</td>
						<td><input type="text" name="CABADDRESS2" size="30" value="<?php echo $row['CABADDRESS2']?>"/></td>
						<td class="left_txt"></td>
					</tr>

					<tr bgcolor="#f2f2f2">
						<td height="30" align="right"  class="left_txt2">网站名称：</td>
						<td>&nbsp;</td>
						<td height="30" ><input name="WNAME" type="text" size="30" value="<?php echo $row['WNAME']?>"/></td>
						<td height="30"  class="left_txt"></td>
					</tr>
					<tr bgcolor="#f2f2f2">
						<td height="30" align="right"  class="left_txt2">网站域名：</td>
						<td>&nbsp;</td>
						<td height="30" ><input name="CDOMAIN" type="text" size="30" value="<?php echo $row['WNAME']?>"/></td>
						<td height="30"  class="left_txt"></td>
					</tr>
					<tr>
						<td height="30" align="right" class="left_txt2">网站样式：</td>
						<td>&nbsp;</td>
						<td><input type="text" name="WSTYLE" size="30" value="<?php echo $row['WSTYLE']?>"/></td>
						<td class="left_txt"></td>
					</tr>
					<tr bgcolor="#f2f2f2">
						<td height="30" align="right"  class="left_txt2">是否开启Video：</td>
						<td>&nbsp;</td>
						<td height="30" >
							  <select name="VIDEOFLAG" width="30">
							    <option value="0" <?php echo $row['VIDEOFLAG']==0?"selected":""?>>否</option>
							    <option value="1" <?php echo $row['VIDEOFLAG']==1?"selected":""?>>是</option>
							  </select>

							</td>
						<td height="30"  class="left_txt"></td>
					</tr>


					<tr>
						<td height="30" align="right" class="left_txt2">展柜名称：</td>
						<td>&nbsp;</td>
						<td><input type="text" name="SHOWCASENAME" size="30" value="<?php echo $row['SHOWCASENAME']?>"/></td>
						<td class="left_txt"></td>
					</tr>
					<tr bgcolor="#f2f2f2">
						<td height="30" align="right"  class="left_txt2">首页展柜显示产品数：</td>
						<td>&nbsp;</td>
						<td height="30" >
							  <select name="SHOWCASENUM" width="30">
							    <option value="10" <?php echo $row['SHOWCASENUM']==10?"selected":""?>>10</option>
							    <option value="15" <?php echo $row['SHOWCASENUM']==15?"selected":""?>>15</option>
							    <option value="20" <?php echo $row['SHOWCASENUM']==20?"selected":""?>>20</option>
							    <option value="25" <?php echo $row['SHOWCASENUM']==25?"selected":""?>>25</option>
							    <option value="30" <?php echo $row['SHOWCASENUM']==30?"selected":""?>>30</option>
							    <option value="35" <?php echo $row['SHOWCASENUM']==35?"selected":""?>>35</option>
							    <option value="40" <?php echo $row['SHOWCASENUM']==40?"selected":""?>>40</option>
							  </select>

							</td>
						<td height="30"  class="left_txt"></td>
					</tr>

					<tr height=50>
						<td>&nbsp;</td>
						<td colspan=3><input type="submit" value=" 确 定 " name=submit />   <input type="reset" value=" 设 置 " /> 	<?php echo $tib ?></td>
					</tr>
				</form>
			  </table>
			</td>
		</tr>



	 </table>






	<!-- 网页内容部分结束 -->
	</td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
</html>
